const dns=require('dns');
dns.lookup('www.baidu.com',(err,address,family)=>{
    console.log(`ip address: ${address}`);
    dns.reverse(address,(err,hostnames)=>{
        if(err){
            console.log(err.stack);
        }
        console.log(`address: ${address} ${JSON.stringify(hostnames)}`);
    });
});
